{% macro html_header(resource_version) -%}
  <link rel="stylesheet" href="/css/v{{resource_version}}/doc.css" />
  <link rel="stylesheet" href="/css/v{{resource_version}}/lightbox.css">
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  <script src="/js/v{{resource_version}}/lightbox.js"></script>
  <script src="/js/v{{resource_version}}/time.js"></script>
{%- endmacro %}

{% macro profile_url(profile) -%}
{% if not profile %}/profile{% else %}/profile/{{profile.key().name()|base64}}{% endif %}
{%- endmacro %}

{% macro profile_link(profile) %}{% if not profile -%}
  <i>Unknown</i>
{%- else %}
  <a href="/profile/{{profile.key().name()|base64}}"><img src="{{profile|profile_shield}}" class="editor-shield" width="16" height="16" alt="Shield" />
  {{profile.display_name}}</a>
{%- endif %}{% endmacro %}